package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.List;
import java.util.Set;

/**
 * 用户实体类
 */
@TableName("t_user")
public class UserBean {
    /**编号*/
    @TableId(value = "pk_userId",type = IdType.AUTO)
    private Integer id;
    /**姓名*/
    @TableField("u_name")
    private String name;
    /**权限列表*/
    @TableField(exist = false)
    private Set<GradeBean> gradeSet;

    public UserBean(String name) {
        this.name = name;
    }

    public UserBean() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Set<GradeBean> getGradeSet() {
        return gradeSet;
    }

    public void setGradeSet(Set<GradeBean> gradeSet) {
        this.gradeSet = gradeSet;
    }

    @Override
    public String toString() {
        return "UserBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", gradeSet=" + gradeSet +
                '}';
    }
}
